package ru.myrtle.umf.query.condition;

public class UBooleanCondition extends UValueCondition<Boolean, UBooleanAdapter> {

    private final Boolean value;

    public UBooleanCondition(Boolean value) {
        this(
                value, UBooleanAdapter.DEFAULT
        );
    }

    public UBooleanCondition(Boolean value, UBooleanAdapter valueAdapter) {
        super(
                valueAdapter
        );
        this.value = value;
    }

    @Override
    protected boolean isSatisfiedImpl(Boolean adapted) {
        return adapted.equals(value);
    }
}
